#ifndef COUNTER_H__MINCOM__COMMONKIT__INCLUDED_
#define COUNTER_H__MINCOM__COMMONKIT__INCLUDED_

namespace MinCOM
{

	struct Counter
	{
	public:

		Counter();
		virtual ~Counter();

		static Counter* Create();
		static void Release(Counter* pCounter);

		void Increment();
		void Decrement();

		uintptr_t GetCount();

	private:

		void DoRelease();

	private:

		uintptr_t count_;

	};

}

#endif // !COUNTER_H__MINCOM__COMMONKIT__INCLUDED_

